
package net.swa.dewei.service.ws;

import java.util.List;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import net.swa.dewei.beans.entity.DingDan;
import net.swa.dewei.beans.entity.DingDanCard;
import net.swa.dewei.beans.entity.MenDian;
import net.swa.dewei.beans.entity.Merchants;
import net.swa.dewei.beans.entity.WeixinInfo;
import net.swa.dewei.beans.vo.GroupAndMaxId;
import net.swa.dewei.beans.vo.StatisMendian;
import net.swa.dewei.beans.vo.VoBackModel;
import net.swa.dewei.beans.vo.VoBackObj;
import net.swa.dewei.beans.vo.VoDingDanCard;
import net.swa.dewei.beans.vo.VoFuwuzhan;
import net.swa.dewei.beans.vo.VoListPage;
import net.swa.system.beans.entity.Dict;

@WebService
public interface DeweiService
{
    /**
     * 根据服务站查询订单，若没有服务站查询全部(订单中含省市县)
     * @param customerName  客户名称
     * @param customerTel   客户电话
     * @param mendianName   门店名称
     * @param dingDanUid    订单编号
     * @param state         状态
     * @param changeType    更换方式
     * @param fuwuZhanId    服务站id
     * @param currentPage
     * @param pageSize
     * @return
     */
    @WebMethod
    public VoListPage<DingDan> queryDingdansPage2(@WebParam(name = "customerName") String customerName , @WebParam(name = "customerTel") String customerTel , @WebParam(name = "mendianName") String mendianName , @WebParam(name = "dingDanUid") String dingDanUid , @WebParam(name = "state") String state , @WebParam(name = "changeType") String changeType , @WebParam(name = "currentId") Long currentId , @WebParam(name = "pageSize") int pageSize , @WebParam(name = "token") String token , @WebParam(name = "mac") String mac);

    /**
     * 根据服务站和订单id查询分组数据,并返回当前最大id
     * @param fuwuzhanId
     * @param dingdanId
     * @return
     */
    @WebMethod
    public GroupAndMaxId queryGroupMax(@WebParam(name = "dingdanId") Long dingdanId , @WebParam(name = "state") String state , @WebParam(name = "token") String token , @WebParam(name = "mac") String mac);

    /**
     * 根据id更改订单状态
     * @param id
     * @param status
     * @return
     */
    @WebMethod
    public VoBackObj updateOrderStatus(@WebParam(name = "id") Long id , @WebParam(name = "status") String status , @WebParam(name = "token") String token , @WebParam(name = "mac") String mac);

    /**
     * 根据订单id到门店shopId
     * @param id 订单id
     * @param shopId 门店id
     * @return
     */
    @WebMethod
    public VoBackObj updateAssign(@WebParam(name = "id") Long id , @WebParam(name = "shopId") Long shopId , @WebParam(name = "token") String token , @WebParam(name = "mac") String mac);

    /**门店分页查询**/
    @WebMethod
    VoListPage<MenDian> queryMendianPage(@WebParam(name = "name") String name , @WebParam(name = "nickname") String nickname , @WebParam(name = "currentId") Long currentId , @WebParam(name = "pageSize") int pageSize , @WebParam(name = "token") String token , @WebParam(name = "mac") String mac) throws Exception;

    /**门店分页查询**/
    @WebMethod
    VoListPage<MenDian> queryStationPage(@WebParam(name = "name") String name , @WebParam(name = "nickname") String nickname , @WebParam(name = "currentId") Long currentId , @WebParam(name = "pageSize") int pageSize , @WebParam(name = "token") String token , @WebParam(name = "isStation") Boolean isStation , @WebParam(name = "mac") String mac) throws Exception;

    /**
     * 门店Id不为null 时候更新门店，更新时间为系统时间，oldWxid为更改更改前微信id(可null)
     * @param model
     * @param oldWxid
     * @param token
     * @param mac
     * @return
     */
    @WebMethod
    public VoBackObj updateMendian(@WebParam(name = "model") MenDian model , @WebParam(name = "oldWxid") String oldWxid , @WebParam(name = "token") String token , @WebParam(name = "mac") String mac);

    /**
     * 门店Id为null 时候新增门店，新增时间为系统时间
     * @param model
     * @param token
     * @param mac
     * @return
     */
    @WebMethod
    public VoBackObj addMenDian(@WebParam(name = "model") MenDian model , @WebParam(name = "token") String token , @WebParam(name = "mac") String mac);

    /**根据门店Ids，删除门店（逻辑删除状态0删除，1有效）**/
    @WebMethod
    VoBackObj delete(@WebParam(name = "ids") Long[] ids , @WebParam(name = "token") String token , @WebParam(name = "mac") String mac);

    /**
     * 微信信息分页查询
     * @param nickname  昵称（null）
     * @param wxid  当前的微信id(null),待扩展使用
     * @param currentPage  当前页
     * @param pageSize 页大小
     * @return
     */
    @WebMethod
    VoListPage<WeixinInfo> queryWeixinPage(@WebParam(name = "nickname") String nickname , @WebParam(name = "wxid") String wxid , @WebParam(name = "currentId") String currentId , @WebParam(name = "pageSize") int pageSize , @WebParam(name = "token") String token , @WebParam(name = "mac") String mac);

    /***
     * 服务站登陆，成功返回服务站信息否则null
     * @param loginName
     * @param password
     * @return
     */
    @WebMethod
    VoFuwuzhan loginByFuwuzhan(@WebParam(name = "loginName") String loginName , @WebParam(name = "password") String password , @WebParam(name = "mac") String mac);

    /**
     * 修改密码
     * @param userid  登录名
     * @param oldpwd  老密码
     * @param password  新密码
     * @return
     */
    @WebMethod
    VoBackObj resetPassword(@WebParam(name = "userid") String userid , @WebParam(name = "oldpwd") String oldpwd , @WebParam(name = "password") String password , @WebParam(name = "token") String token , @WebParam(name = "mac") String mac);

    /**
     *  订单统计查询
     * @param sdate 开始日期 格式如 2014-07-05 00:00:00
     * @param edate 结束日期 格式如2014-07-05 23:59:59
     * @param name  门店名称
     * @param changeType
     * @param currentId
     * @param pageSize
     * @param token
     * @param mac
     * @return
     */
    @WebMethod
    VoListPage<StatisMendian> queryStaticPage(@WebParam(name = "sdate") String sdate , @WebParam(name = "edate") String edate , @WebParam(name = "name") String name , @WebParam(name = "changeType") String changeType , @WebParam(name = "currentId") Long currentId , @WebParam(name = "pageSize") int pageSize , @WebParam(name = "token") String token , @WebParam(name = "mac") String mac);

    VoListPage<MenDian> queryMendExtPage(@WebParam(name = "name") String name , @WebParam(name = "nickname") String nickname , @WebParam(name = "currentId") Long currentId , @WebParam(name = "pageSize") int pageSize , @WebParam(name = "token") String token , @WebParam(name = "isStation") Boolean isStation , @WebParam(name = "weixiu") Boolean weixiu , @WebParam(name = "xiaoshou") Boolean xiaoshou , @WebParam(name = "mac") String mac) throws Exception;

    VoListPage<MenDian> queryMendExtenPage(@WebParam(name = "name") String name , @WebParam(name = "nickname") String nickname , @WebParam(name = "currentId") Long currentId , @WebParam(name = "pageSize") int pageSize , @WebParam(name = "token") String token , @WebParam(name = "isStation") Boolean isStation , @WebParam(name = "weixiu") Boolean weixiu , @WebParam(name = "xiaoshou") Boolean xiaoshou , @WebParam(name = "mobiCharge") Boolean mobiCharge , @WebParam(name = "mac") String mac) throws Exception;

    /**
     * 一卡通商城订单
     * @param customerName
     * @param customerTel
     * @param mendianName
     * @param dingDanUid
     * @param state
     * @param buyType
     * @param currentId
     * @param pageSize
     * @param token
     * @param mac
     * @return
     */
    @WebMethod
    public VoListPage<DingDanCard> queryCardOrders(@WebParam(name = "customerName") String customerName , @WebParam(name = "customerTel") String customerTel , @WebParam(name = "mendianName") String mendianName , @WebParam(name = "dingDanUid") String dingDanUid , @WebParam(name = "state") String state , @WebParam(name = "buyType") String buyType , @WebParam(name = "currentId") Long currentId , @WebParam(name = "pageSize") int pageSize , @WebParam(name = "token") String token , @WebParam(name = "mac") String mac);

    /**
     * 一卡通订单详情
     * @param id
     * @param token
     * @param mac
     * @return
     */
    @WebMethod
    public VoBackModel<VoDingDanCard> queryCardOrderById(@WebParam(name = "id") Long id , @WebParam(name = "token") String token , @WebParam(name = "mac") String mac);

    /**
     * 更改订单状态,
     * 如果有shopId 则说明要指定门店，暂时可不传
     * @param id
     * @param status
     * @param token
     * @param mac
     * @return
     */
    @WebMethod
    public VoBackObj updateCardOrderStatus(@WebParam(name = "id") Long id , @WebParam(name = "status") String status , @WebParam(name = "shopId") Long shopId , @WebParam(name = "token") String token , @WebParam(name = "mac") String mac);

    /**
     * 新增or修改商家活动信息
     * @param model
     * @param token
     * @param mac
     * @return
     */
    @WebMethod
    public VoBackObj addOrUpdateMerchant(@WebParam(name = "model") Merchants model , @WebParam(name = "token") String token , @WebParam(name = "mac") String mac);

    /**
     * 商家活动信息查询
     * @param name
     * @param lxr
     * @param address
     * @param no
     * @param tatus
     * @param changeType
     * @param currentId
     * @param pageSize
     * @param token
     * @param mac
     * @return
     */
    @WebMethod
    public VoListPage<Merchants> queryMerchantPage(@WebParam(name = "name") String name , @WebParam(name = "lxr") String lxr , @WebParam(name = "address") String address , @WebParam(name = "no") String no , @WebParam(name = "status") String status , @WebParam(name = "type") String changeType , @WebParam(name = "currentId") Long currentId , @WebParam(name = "pageSize") int pageSize , @WebParam(name = "token") String token , @WebParam(name = "mac") String mac);

    /**
     * 查询商家类型
     * @return
     */
    public VoListPage<Dict> queryMerchantsTypes(@WebParam(name = "token") String token , @WebParam(name = "mac") String mac);

    /**
     * 根据id删除商家
     * @param id
     * @param token
     * @param mac
     * @return
     */
    public VoBackObj deleteMerchant(@WebParam(name = "id") Long id , @WebParam(name = "token") String token , @WebParam(name = "mac") String mac);

}
